module = {}
local wibox = require('wibox')

function module.refresh()
	local file = io.popen("xbacklight -get")
	local brightness = file:read() or "unkown"
	widget=wibox.widget{
	markup = '<span font="WenQuanYi Zen Hei 9">亮度:'..brightness..'% </span>',
	align = 'center',
	valign = 'center',
	widget = wibox.widget.textbox
}
return widget
end

function module.increase_brightness()
	os.execute('xbacklight -inc 5')
end

function module.decrease_brightness()
	os.execute('xbacklight -dec 5')
end

return module
